Documentation

UserAccessVoter extends Voter
in package

Table of Contents

Constants

CONNECTED  = 'connected'
DELETE  = 'delete'
EDIT  = 'edit'
UNCONNECTED  = 'unconnected'

Methods

supports()  : bool
Check if the voter supports the given attribute and subject.
voteOnAttribute()  : bool
Votes on whether the authenticated user has access to a specific attribute.

Constants

Methods

supports()

Check if the voter supports the given attribute and subject.

public supports(string $attribute, mixed $subject) : bool
Parameters
$attribute : string

The attribute to check.

$subject : mixed

The subject to check.

Return values
bool

Returns true if the voter supports the attribute and subject, false otherwise.

voteOnAttribute()

Votes on whether the authenticated user has access to a specific attribute.

public voteOnAttribute(string $attribute, mixed $subject, TokenInterface $token) : bool
Parameters
$attribute : string

The attribute to check access for.

$subject : mixed

The subject to check access against.

$token : TokenInterface

The token representing the authenticated user.

Return values
bool

True if the user has access, false otherwise.


        
On this page

Search results